package com.msw.jcwapi.wb.wbrm.controller;


import com.msw.jcwapi.common.result.Result;
import com.msw.jcwapi.wb.wbdz.entity.Wbdz;
import com.msw.jcwapi.wb.wbrm.entity.Wbstruct;
import com.msw.jcwapi.wb.wbrm.service.IWbstructService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-04-27
 */
@RestController
@RequestMapping("/wbstruct")
public class WbstructController {

    @Autowired
    private IWbstructService wbstructService;

    //    查询工程id对应工程的全部底座类型
    @GetMapping("/list/{id}")
    public Result list(@PathVariable Integer id) {
        return Result.ok(wbstructService.listByPId(id));
    }

    //编辑(通过pid编辑)
    @PutMapping
    public Result update(@RequestBody Wbstruct wbstruct){
        return  Result.ok(wbstructService.update(wbstruct));
    }

}
